import plugin from '../../lib/plugins/plugin.js';
import { segment } from "oicq"; // 添加oicq模块以使用segment.image
let url = 'https://as.aa.cab/api/cos'; // 主人返回图的API


export class helpPhoto extends plugin {
constructor() {
super({
name: '发文字',
dsc: '图化链接',
event: 'message',
priority: 0,
rule: [
{
reg: '^#?(喵喵)?(COS|原神|泡妞|美女)$',
fnc: 'sendHelpImage'
}
]
})
}

async sendHelpImage(e) {
if (e.isMaster) {
setTimeout(async() => {
e.reply([
"请看一下。",
segment.image(url), // 图片.
"好看吗，去你妈的！"
], true);
}, 1000); // 单位毫秒
} else {
setTimeout(async() => {
e.reply([
"憨憨，看完了吧，来看看腿缓缓吧。",
segment.image(url) // 图片.
], true);
}, 5000); // 单位毫秒
}
return false; //返回true，阻挡消息不再往下.
}
}